#!/usr/bin/env node

const cp = require('child_process');

console.log(`I am father process.pid: ${process.pid}`);

//setTimeout(()=>{
//  console.log('5 seconds passed, father over');
//  process.exit();
//},5000);

cp.execFile('node',['03-child.js'],(error,out,err)=>{
  if(error){
    console.error(err.toString('utf8'));
  }
  else{
    console.log(out.toString('utf8'));
  }
});



//console.log('hello world');
